%!PS
%%Version: 3.15
%%DocumentFonts: (atend)
%%Pages: (atend)
%%EndComments
%ident	"@(#)lp:filter/postscript/postscript/dpost.ps	1.1"
%
% Version 3.16 prologue for troff files.
%

/#copies 1 store
/aspectratio 1 def
/formsperpage 1 def
/landscape false def
/linewidth .3 def
/magnification 1 def
/margin 0 def
/orientation 0 def
/resolution 720 def
/xoffset 0 def
/yoffset 0 def

/roundpage true def
/useclippath true def
/pagebbox [0 0 612 792] def

/R  /Times-Roman def
/I  /Times-Italic def
/B  /Times-Bold def
/BI /Times-BoldItalic def
/H  /Helvetica def
/HI /Helvetica-Oblique def
/HB /Helvetica-Bold def
/HX /Helvetica-BoldOblique def
/CW /Courier def
/CO /Courier def
/CI /Courier-Oblique def
/CB /Courier-Bold def
/CX /Courier-BoldOblique def
/PA /Palatino-Roman def
/PI /Palatino-Italic def
/PB /Palatino-Bold def
/PX /Palatino-BoldItalic def
/Hr /Helvetica-Narrow def
/Hi /Helvetica-Narrow-Oblique def
/Hb /Helvetica-Narrow-Bold def
/Hx /Helvetica-Narrow-BoldOblique def
/KR /Bookman-Light def
/KI /Bookman-LightItalic def
/KB /Bookman-Demi def
/KX /Bookman-DemiItalic def
/AR /AvantGarde-Book def
/AI /AvantGarde-BookOblique def
/AB /AvantGarde-Demi def
/AX /AvantGarde-DemiOblique def
/NR /NewCenturySchlbk-Roman def
/NI /NewCenturySchlbk-Italic def
/NB /NewCenturySchlbk-Bold def
/NX /NewCenturySchlbk-BoldItalic def
/ZD /ZapfDingbats def
/ZI /ZapfChancery-MediumItalic def
/VR /Varitimes#Roman def
/VI /Varitimes#Italic def
/VB /Varitimes#Bold def
/VX /Varitimes#BoldItalic def
/S  /S def
/S1 /S1 def
/GR /Symbol def

/inch {72 mul} bind def
/min {2 copy gt {exch} if pop} bind def

/setup {
	counttomark 2 idiv {def} repeat pop

	landscape {/orientation 90 orientation add def} if
	/scaling 72 resolution div def
	linewidth setlinewidth
	1 setlinecap

	pagedimensions
	xcenter ycenter translate
	orientation neg rotate
	width 2 div neg height 2 div translate
	xoffset inch yoffset inch translate
	margin 2 div dup neg translate
	magnification dup aspectratio mul scale
	scaling scaling scale

	/Symbol /S Sdefs cf
	/Times-Roman /S1 S1defs cf
	0 0 moveto
} def

/pagedimensions {
	useclippath userdict /gotpagebbox known not and {
		/pagebbox [clippath pathbbox newpath] def
		roundpage currentdict /roundpagebbox known and {roundpagebbox} if
	} if
	pagebbox aload pop
	4 -1 roll exch 4 1 roll 4 copy
	landscape {4 2 roll} if
	sub /width exch def
	sub /height exch def
	add 2 div /xcenter exch def
	add 2 div /ycenter exch def
	userdict /gotpagebbox true put
} def

/pagesetup {
	/page exch def
	currentdict /pagedict known currentdict page known and {
		page load pagedict exch get cvx exec
	} if
} def

/decodingdefs [
	{counttomark 2 idiv {y moveto show} repeat}
	{neg /y exch def counttomark 2 idiv {y moveto show} repeat}
	{neg moveto {2 index stringwidth pop sub exch div 0 32 4 -1 roll widthshow} repeat}
	{neg moveto {spacewidth sub 0.0 32 4 -1 roll widthshow} repeat}
	{counttomark 2 idiv {y moveto show} repeat}
	{neg setfunnytext}
] def

/setdecoding {/t decodingdefs 3 -1 roll get bind def} bind def

/w {neg moveto show} bind def
/m {neg dup /y exch def moveto} bind def
/done {/lastpage where {pop lastpage} if} def

/f {
	dup /font exch def findfont exch
	dup /ptsize exch def scaling div dup /size exch def scalefont setfont
	linewidth ptsize mul scaling 10 mul div setlinewidth
	/spacewidth ( ) stringwidth pop def
} bind def

/changefont {
	/fontheight exch def
	/fontslant exch def
	currentfont [
		1 0
		fontheight ptsize div fontslant sin mul fontslant cos div
		fontheight ptsize div
		0 0
	] makefont setfont
} bind def

/sf {f} bind def

/cf {
	dup length 2 idiv
	/entries exch def
	/chtab exch def
	/newfont exch def

	findfont dup length 1 add dict
	/newdict exch def
	{1 index /FID ne {newdict 3 1 roll put} {pop pop} ifelse} forall

	newdict /Metrics entries dict put
	newdict /Metrics get
	begin
		chtab aload pop
		1 1 entries {pop def} for
		newfont newdict definefont pop
	end
} bind def

%
% A few arrays used to adjust reference points and character widths in some
% of the printer resident fonts. If square roots are too high try changing
% the lines describing /radical and /radicalex to,
%
%	/radical	[0 -75 550 0]
%	/radicalex	[-50 -75 500 0]
%

/Sdefs [
	/bracketlefttp		[220 500]
	/bracketleftbt		[220 500]
	/bracketrighttp		[-70 380]
	/bracketrightbt		[-70 380]
	/braceleftbt		[220 490]
	/bracketrightex		[220 -125 500 0]
	/radical		[0 0 550 0]
	% NeWSprint's \(br is too low, compensate
	statusdict /product get (NeWS Server) eq {
		/radicalex		[-50 100 500 0]
		/parenleftex		[-20 100 0 0]

	} {
		/radicalex		[-50 0 500 0]
		/parenleftex		[-20 -170 0 0]
	} ifelse
	/integral		[100 -50 500 0]
	/infinity		[10 -75 730 0]
] def

/S1defs [
	/underscore		[0 80 500 0]
	/endash			[7 90 650 0]
] def
%%EndProlog
%%BeginSetup
mark
/resolution 720 def
setup
2 setdecoding
%%EndSetup
%%Page: 1 1
save
mark
1 pagesetup
10 R f
(WordNet)720 480 w
10 S f
(\324)1091 480 w
10 R f
( \( 3WN \))3 330( BINSRCH)1 3130(Library Functions)1 727 3 1213 480 t
9 B f
(NAME)720 960 w
10 R f
(bin)1080 1080 w
10 S f
(_)1208 1080 w
10 R f
(search, copy\256le, replace)2 979 1 1258 1080 t
10 S f
(_)2237 1080 w
10 R f
(line, insert)1 430 1 2287 1080 t
10 S f
(_)2717 1080 w
10 R f
(line)2767 1080 w
9 B f
(SYNOPSIS)720 1248 w
10 B f
(char)1080 1368 w
10 S f
(*)1307 1368 w
10 B f
(bin)1357 1368 w
10 S f
(_)1497 1368 w
10 B f
(search\(char)1547 1368 w
10 S f
(*)2084 1368 w
10 B f
(key, FILE)1 442 1 2134 1368 t
10 S f
(*)2609 1368 w
10 B f
(fp\);)2659 1368 w
(void copy\256le\(FILE)1 812 1 1080 1536 t
10 S f
(*)1925 1536 w
10 B f
(fromfp, FILE)1 591 1 1975 1536 t
10 S f
(*)2599 1536 w
10 B f
(tofp\);)2649 1536 w
(char)1080 1704 w
10 S f
(*)1307 1704 w
10 B f
(replace)1357 1704 w
10 S f
(_)1667 1704 w
10 B f
(line\(char)1717 1704 w
10 S f
(*)2133 1704 w
10 B f
(new)2183 1704 w
10 S f
(_)2355 1704 w
10 B f
(line, char)1 408 1 2405 1704 t
10 S f
(*)2846 1704 w
10 B f
(key, FILE)1 442 1 2896 1704 t
10 S f
(*)3371 1704 w
10 B f
(fp\);)3421 1704 w
(char)1080 1872 w
10 S f
(*)1307 1872 w
10 B f
(insert)1357 1872 w
10 S f
(_)1601 1872 w
10 B f
(line\(char)1651 1872 w
10 S f
(*)2067 1872 w
10 B f
(new)2117 1872 w
10 S f
(_)2289 1872 w
10 B f
(line, char)1 408 1 2339 1872 t
10 S f
(*)2780 1872 w
10 B f
(key, FILE)1 442 1 2830 1872 t
10 S f
(*)3305 1872 w
10 B f
(fp\);)3355 1872 w
9 B f
(DESCRIPTION)720 2040 w
10 R f
( functions for performing a binary search and)7 1998(The WordNet library contains several general purpose)6 2322 2 1080 2160 t
(modifying sorted \256les.)2 919 1 1080 2280 t
10 B f
(bin)1080 2448 w
10 S f
(_)1220 2448 w
10 B f
(search\( \))1 359 1 1270 2448 t
10 R f
( algorithm to search for)4 997(is the primary binary search)4 1170 2 1668 2448 t
10 I f
(key)3875 2448 w
10 R f
(as the \256rst item on a line in the)8 1353 1 4047 2448 t
(\256le pointed to by)3 723 1 1080 2568 t
10 I f
(fp)1842 2568 w
10 R f
( of the \256elds on the line, if any, must)9 1586( delimiter between the key and the rest)7 1642(. The)1 252 3 1920 2568 t
( pointer to a static variable containing the entire line is returned.)11 2722( A)1 145(be a space.)2 464 3 1080 2688 t
9 B f
(NULL)4484 2688 w
10 R f
( if a)2 187(is returned)1 439 2 4774 2688 t
(match is not found.)3 796 1 1080 2808 t
(The remaining functions are not used by WordNet, and are only brie\257y described.)12 3367 1 1080 2976 t
10 B f
(copy\256le\( \))1 410 1 1080 3144 t
10 R f
(copies the contents of one \256le to another.)7 1698 1 1523 3144 t
10 B f
(replace)1080 3312 w
10 S f
(_)1390 3312 w
10 B f
(line\( \))1 238 1 1440 3312 t
10 R f
(replaces a line in a \256le having searchkey)7 1734 1 1720 3312 t
10 I f
(key)3496 3312 w
10 R f
( contents of)2 502(with the)1 342 2 3670 3312 t
10 I f
(new)4557 3312 w
10 S f
(_)4718 3312 w
10 I f
(line)4768 3312 w
10 R f
( returns)1 320(. It)1 162 2 4918 3312 t
(the original line or)3 765 1 1080 3432 t
9 B f
(NULL)1878 3432 w
10 R f
(in case of error.)3 649 1 2161 3432 t
10 B f
(insert)1080 3600 w
10 S f
(_)1324 3600 w
10 B f
(line\( \))1 238 1 1374 3600 t
10 R f
(\256nds the proper place to insert the contents of)8 1889 1 1645 3600 t
10 I f
(new)3567 3600 w
10 S f
(_)3728 3600 w
10 I f
(line)3778 3600 w
10 R f
(, having searchkey)2 761 1 3928 3600 t
10 I f
(key)4722 3600 w
10 R f
(in the sorted)2 512 1 4888 3600 t
(\256le pointed to by)3 705 1 1080 3720 t
10 I f
(fp)1818 3720 w
10 R f
( returns)1 310(. It)1 152 2 1896 3720 t
9 B f
(NULL)2391 3720 w
10 R f
(if a line with this searchkey is already in the \256le.)10 2019 1 2674 3720 t
9 B f
(NOTES)720 3888 w
10 R f
(The maximum length of)3 993 1 1080 4008 t
10 I f
(key)2106 4008 w
10 R f
(is 1024.)1 325 1 2271 4008 t
(The maximum line length in a \256le is 25K.)8 1739 1 1080 4248 t
( by at least one space)5 950(If there are no additional \256elds after the search key, the key must be followed)14 3370 2 1080 4488 t
(before the newline character.)3 1180 1 1080 4608 t
9 B f
(SEE ALSO)1 460 1 720 4776 t
10 B f
(wnintro)1080 4896 w
10 R f
(\(3WN\),)1419 4896 w
10 B f
(morph)1759 4896 w
10 R f
(\(3WN\),)2048 4896 w
10 B f
(wnsearch)2388 4896 w
10 R f
(\(3WN\),)2793 4896 w
10 B f
(wnutil)3133 4896 w
10 R f
(\(3WN\),)3406 4896 w
10 B f
(wnintro)3746 4896 w
10 R f
(\(5WN\).)4085 4896 w
9 B f
(WARNINGS)720 5064 w
10 B f
(binsearch\( \))1 499 1 1080 5184 t
10 R f
( returned string should be copied by the)7 1696( The)1 229(returns a pointer to a static character buffer.)7 1856 3 1619 5184 t
(caller if the results need to be saved, as a subsequent call will replace the contents of the static buffer.)19 4201 1 1080 5304 t
( 1)1 1883( change: Jan 2005)3 742( Last)1 1526(WordNet 2.1)1 529 4 720 7680 t
cleartomark
showpage
restore
%%EndPage: 1 1
%%Trailer
done
%%DocumentFonts: Times-Roman Symbol Times-Bold Times-Italic
%%Pages: 1
